package org.example.java8.defaultmethod;

/**
 * @author 夏焰波
 * @date 2020-07-15 1:31
 */
public class DefaultInAction {
    //default method
    public static void main(String[] args) {
        A a = () -> 10;
        System.out.println(a.size());
        System.out.println(a.isEmpty());
    }

    private interface A {
        int size();

        default boolean isEmpty() {
            return size() == 0;
        }
    }
}
